package com.gymmsystem.GYMMSystem.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import java.time.LocalDateTime;

@Data
@TableName("users")
public class User {
    @TableId(value = "user_id", type = IdType.AUTO)
    private Long userId;

    @TableField("u_mobile")
    @JsonProperty("uMobile")
    private String uMobile;

    @TableField("u_pw")
    @JsonProperty("uPw")
    private String uPw;

    @TableField("u_nickname")
    @JsonProperty("uNickname")
    private String uNickname;

    // 积分（0就是普通用户，0-99初级会员，99-399中级会员，399以上高级会员）
    @TableField("u_points")
    @JsonProperty("uPoints")
    private Integer uPoints;

    @TableField("u_rt")
    @JsonProperty("uRt")
    private Integer uRt;

    @TableField(value = "created_at", fill = FieldFill.INSERT)
    @JsonProperty("createdAt")
    private LocalDateTime createdAt;

    @TableField(value = "updated_at", fill = FieldFill.INSERT_UPDATE)
    @JsonProperty("updatedAt")
    private LocalDateTime updatedAt;
}